<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>CSS 分页按钮案例</title>
</head>
<style>
*{
    margin: 0;
    padding: 0;
}
.pagination{
    width: 223px;
    height: 50px;
    margin: 100px auto;
    background-color: white;
    font-size: 0;
}
.pagination a{
    display: inline-block;
    width: 50px;
    height: 50px;
    text-decoration: none;
    color: #08f;
    text-align: center;
    line-height: 50px;
    font-size: 14px;
    border: 1px solid #08f;
    border-radius: 5px;
}

.pagination a:nth-child(1n+2){
    margin-left: 5px;
} 
.pagination a:hover,.pagination a.current{
    background-color: #08f;
    color: white;
}
</style>
<body>
    <div class="pagination">
        <a class="current" href="">1</a>
        <a href="">2</a>
        <a href="">3</a>
        <a href="">4</a>
    </div>
</body>
</html>